{extend name="template/base" /}
{block name="content"}
<div class="page-container">
    <div id="tab_demo" class="HuiTab">
        <div class="tabBar clearfix"><span>店铺信息</span><span>注册信息</span></div>
        {include file='store/store/store_setting'}
        {include file='store/store/joinin_setting'}
    </div>
    
</div>
{/block}
{block name="script"}
<script type="text/javascript" src="/static/area/area.min.js?v=1.0"></script>
<script type="text/javascript" src="__LIB__/Validform/5.3.2/Validform.min.js"></script>
<script type="text/javascript">
    $(function () {
        $("[name='store_state'][value='{$vo.store_state==1 ? 1 : 0}']").attr("checked", true);
        $("[name='email_bind'][value='{$vo.email_bind==1 ? 1 : 0}']").attr("checked", true);
        $.Huitab("#tab_demo .tabBar span","#tab_demo .tabCon","current","click","0");
        WYArea.init(function(){
            WYArea.select({
                def:"<?php echo $vo['areacode'] ?>",     //初始化结点 支持 地区编码/拼音/地区ID
                col:'code',     //select值使用哪个字段　可选值　code|aid|py，默认为code
                level : 3,      //联动级别
                prov:'#prov_store',  //省对象
                city:'#city_store',  //市对象
                area:'#area_store',  //区对象
                init:function() {  },  //初始化结束回调
                change:function(val) { $('#areacode').val(val); }  //change回调事件，只对level指定的级别进行回调
            });
            WYArea.select({
                def:"<?php echo $joinin_info['company_area_code']; ?>",     //初始化结点 支持 地区编码/拼音/地区ID
                col:'code',     //select值使用哪个字段　可选值　code|aid|py，默认为code
                level : 3,      //联动级别
                prov:'#prov_joinin',  //省对象
                city:'#city_joinin',  //市对象
                area:'#area_joinin',  //区对象
                init:function() {  },  //初始化结束回调
                change:function(val) { 
                    $('#areacode_joinin').val(val);
                    $('#company_address_joinin').val($('#prov_joinin option:checked').text() + ' ' + $('#city_joinin option:checked').text() + ' ' + $('#area_joinin option:checked').text()) ;
                }  //change回调事件，只对level指定的级别进行回调
            });
        });
        $('.skin-minimal input').iCheck({
            checkboxClass: 'icheckbox-blue',
            radioClass: 'iradio-blue',
            increaseArea: '20%'
        });

        $("#form").Validform({
            tiptype: 2,
            ajaxPost: true,
            showAllError: true,
            callback: function (ret) {
                ajax_progress(ret);
            }
        });
    })
</script>
{/block}